﻿<UserControl x:Class="SiliconStudio.Meet.EjpControls.DocumentLineHandle"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="300" Width="300">
    <UserControl.Resources>
        <Storyboard x:Key="OnPreviewMouseLeftButtonUp1">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="150"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="150"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="12"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="150"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.6000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_button_saveComment" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.6000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="listBox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.6000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="SaveAndCloseCommentBox">
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="textBox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_button_saveComment" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="listBox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="10"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Height)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="12"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UIElement.PreviewMouseLeftButtonUp" SourceName="_rect_Handle">
            <BeginStoryboard Storyboard="{StaticResource OnPreviewMouseLeftButtonUp1}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="_button_saveComment">
            <BeginStoryboard x:Name="SaveAndCloseCommentBox_BeginStoryboard" Storyboard="{StaticResource SaveAndCloseCommentBox}"/>
        </EventTrigger>
    </UserControl.Triggers>

    <Grid x:Name="LayoutRoot">
        <Grid RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" x:Name="grid" VerticalAlignment="Top" Width="10" Background="#6CBDBDBD" Height="12">
            <Grid.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                    <SkewTransform AngleX="0" AngleY="0"/>
                    <RotateTransform Angle="0"/>
                    <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
            </Grid.RenderTransform>
            <Rectangle HorizontalAlignment="Left" x:Name="_rect_Handle" VerticalAlignment="Top" Width="10" Height="12" Fill="#7079BB67" Stroke="#FF000000"/>
            <TextBox Margin="2,0,18,2" VerticalAlignment="Bottom" Height="22" Text="TextBox" TextWrapping="Wrap" Visibility="Collapsed" x:Name="textBox"/>
            <Button Padding="0,1,0,1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="15.007" Height="22.002" Content="^" Visibility="Collapsed" x:Name="_button_saveComment" BorderThickness="1,1,1,2" Margin="0,0,2.321,1.998"/>
            <ListBox RenderTransformOrigin="0.5,0.5" IsSynchronizedWithCurrentItem="True" Margin="2,15,2,26" x:Name="listBox">
                <ListBox.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </ListBox.RenderTransform>
            </ListBox>
        </Grid>
    </Grid>
</UserControl>
